<?php
if( $_SERVER['HTTP_REFERER'] == "" )
{
exit;
}
include("config.php");
$sql1="select  *  from records";
$result1=$mysqli->query($sql1);
if($result1->num_rows){
    $sql="delete from records where id in (select * from (SELECT max(id)as id FROM records)d)";
    $result=$mysqli->query($sql);
    echo "删除成功!";
}else{
    echo "没有数据";
}
$mysqli->close();

?>
